home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
gnu
/
glibc108.gz
/
glibc108
/
glibc-1.08.1
/
stdio
/
xbug.c
< prev
Wrap
C/C++ Source or Header
|
1994-06-06
|
391b
|
25 lines
#include <stdio.h>
int
main()
{
char * filename = "xbug.c";
FILE *input;
int i;
char buf[256];
if (!freopen (filename, "r", stdin))
fprintf(stderr, "cannot open file\n");
if (!(input = popen("/bin/cat", "r")))
fprintf(stderr, "cannot run \n");
while(gets(buf) != NULL) {
fprintf(stdout, "read: %s\n", buf);
}
return 0;
}